package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.entity.AttrEntity;
import com.atguigu.gulimall.product.vo.AttrGoupRelationVo;
import com.atguigu.gulimall.product.vo.AttrGroupWithAttrResVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrGroupEntity;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author zhuzhu
 * @email 838759460@qq.com
 * @date 2024-04-28 23:03:03
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {
    PageUtils queryPage(Map<String, Object> params);
    PageUtils queryPageByCatId(Map<String, Object> params, Long catId);
    PageUtils queryPageByCatIdv1(Map<String, Object> params, Long catId);

    List<AttrEntity> listAttrByGroupId(Long attrgropId);

    void removeByAttrIdAndGroupId(List<AttrGoupRelationVo> relationVos);

    void removeByAttrIdAndGroupIdV1(List<AttrGoupRelationVo> relationVos);

    PageUtils queryNoRelationsOfThisGroup(Map<String, Object> params, Long attrgroupId);

    PageUtils queryNoRelationsOfThisGroupV1(Map<String, Object> params, Long attrgroupId);

    void saveAttrGroupRelation(List<AttrGoupRelationVo> relationVos);

    List<AttrGroupWithAttrResVo> queryAttrAndGroupByCategoryId(Long catelogId);
    List<AttrGroupWithAttrResVo> queryAttrAndGroupByCategoryIdV1(Long catelogId);
}

